<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<title>管理课程</title>
<link rel="stylesheet" type="text/css" href="Assets/css/reset.css"/>
<script type="text/javascript" src="Assets/js/jquery-1.8.3.min.js"></script>
<link rel="stylesheet" type="text/css" href="Assets/plugins/FlexSlider/flexslider.css">
<script type="text/javascript" src="Assets/plugins/FlexSlider/jquery.flexslider.js"></script>
<script type="text/javascript" src="Assets/js/main.js"></script>
<link rel="stylesheet" type="text/css" href="Assets/css/thems.css">
<link rel="stylesheet" type="text/css" href="Assets/css/responsive.css">
<script language="javascript">
$(window).load(function() {
  $('.flexslider').flexslider({
	animation: "slide"
  });
});
</script>
</head>

<body>
<!--头部-->
<div class="head clearfix">
    <div class="logo"><a href=""><img src="Assets/images/logo.jpg" alt="信本财富"/></a></div>
    <div class="head_r">
    	<div class="lang">
        	<a href="">中文</a>|
        </div>
         <ul class="nav clearfix">
            <li class="now"><a href="index.html">首页</a></li>
            <li><a href="product.html">课程管理</a></li>
            <li><a href="vip.html">会员管理</a></li>
            <li><a href="sig_in.html">签到管理</a></li>
            <li><a href="custom-made.html">定制会员卡</a></li>
            <li><a href="subbranch.html">场馆管理</a></li>
            <li><a href="staff.html">员工管理</a></li>
        </ul>
        <div class="nav_m">
            <span class="n_icon">&nbsp;</span>
            <ul>
                <li><a href="index.html">首页</a></li>
                <li><a href="about.html">关于信本</a></li>
                <li><a href="news.html">信本动态</a></li>
                <li class="now"><a href="product.html">信本业务</a></li>
                <li><a href="#">信本学院</a></li>
                <li><a href="#">社会责任</a></li>
                <li><a href="#">联系我们</a></li>
            </ul>
        </div>
    </div>
</div>
<!--头部-->
<!--幻灯片--><div class="banner">
    <div class="slider">
        <div class="flexslider">
          <ul class="slides">
            <li>
                <a href=""><img src="Assets/upload/banner.jpg" alt="" /></a>
            </li>
            <li>
                <a href=""><img src="Assets/upload/banner_a.jpg" alt="" /></a>
            </li>
            <li>
                <a href=""><img src="Assets/upload/banner_b.jpg" alt="" /></a>
            </li>
            <li>
                <a href=""><img src="Assets/upload/banner_c.jpg" alt="" /></a>
            </li>
            <li>
                <a href=""><img src="Assets/upload/banner_d.jpg" alt="" /></a>
            </li>
          </ul>
        </div>
    </div>
</div>

<!--幻灯片-->
<div class="scd clearfix">
	<div class="scd_l">
    	<div class="title"><span>管理课程</span></div>
        <ul class="s_nav">
            <li><a  onclick="query3()" ><em>修改课程</em></a></li>
            <li><a  onclick="delete1()"><em>删除课程</em></a></li>
            <!--<li> <button><em >删除课程</em></button></li>-->
            <li><a href="product.html"><em>返回</em></a></li>

        </ul>
    </div>
    <div class="scd_r">
    	<div class="s_title">
        	课程管理
            <div class="pst">
            	当前位置：
                <a href="">首页</a>>
                <a href="">课程管理</a>>
                <a href="">课程详情</a>>
            </div>
        </div>
        <div class="scd_m">
        	<div class="pro_d" >
            	<dl class="clearfix" id="tbodyul">
                	<!--<dt><img src="Assets/upload/pic14.jpg" alt=""/></dt>-->
                    <!--<dd>-->
                    <!--&lt;!&ndash; 自动生成课程详情 &ndash;&gt;-->
                    	<!--<h1><span>信本1号-并购投资基金</span></h1>-->
                        <!--<div class="des">-->
                        	<!--<p>产品名称：信本1号-并购投资基金</p>-->
                            <!--<p>产品类型：有限合伙基金</p>-->
                            <!--<p>发行机构：深圳市信本财富投资管理有限公司（中国证券投资基金业协会备案编号：xxxxxxx）</p>-->
                            <!--<p>法律顾问：北京市德恒（深圳）律师事务所-->
<!--投资范围：一线及区域中心城市优质资产、优质企业和与上市公司相关的及法律允许的并购项目。</p>-->
							<!--<p>募集规模：2亿元人民币（优先级：劣后级=4:1）</p>-->
                            <!--<p>产品期限：2年</p>-->
                            <!--<p>认购起点：100万元起，超过部分按10万元的整数倍递增</p>-->
                            <!--<p>收益分配：每季度分配一次预期收益，中途赎回或到期时一次性返还本金</p>-->
                            <!--<p>预期收益：11.00% -14.00%</p>-->
                        <!--</div>-->
                    <!--</dd>-->
                </dl>
                <div class="space_hx">&nbsp;</div>
            </div>
        </div>
    </div>
</div>

</body>
</html>
<script>

    var id;
    var path = "/" + location.pathname.split("/")[1];
    $(function () {

        var thisURL = document.URL;
        var getval = null;
        //判断是不是带有id的请求
        if (thisURL.search("id=") != -1) {
            getval = thisURL.split('?')[1];
            id = getval.split("=")[1];
        }

        console.log(id+"========================")


        $.get(path+"/query2Curriculum",{"id":id},function (list2) {

            console.log(list2+"=================")

            $.each(list2,function (i2,li2) {
                console.log(li2.coursesname+"================")


                $("#tbodyul").append(

                '<dt><img src='+path+'/'+li2.coursesimg +' alt=""/></dt>'+
                    '<dd>'+
                '<h1><span>课程详情</span></h1>'+
                '<div class="des">'+
                '<p>课程名称：'+li2.coursesname +'</p>'+
                    '<p>卡路里值：'+li2.coursescalorie +'</p>'+
                    '<p>课程难度：'+li2.coursesgrade +'星</p>'+
                    '<p>课程类型：'+li2.coursestype +'</p>'+
                    '<p>课程简介：'+li2.coursesintro                                                                                                                                                                          +'</p>'+

               ' </div>'+
                    '<dd>'
                );
            });

        },"json");





    });
    function delete1(){

        $.get(path+"/deleteCurriculum",{"id":id},function (list) {
            var li= eval(list);
            console.log(li+"===============");
            if (li){

                window.location.href="product.html"

            } else {
                alert("删除失败")

            }

        },"json");

    }

    function query3(){
        var toUrl = "update.html?id="+id;
        window.open(toUrl);
    }



</script>
